<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改菜单</title>
    <script src="/layui/layui.all.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css">
</head>
<body>

<form action="/client/update" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">菜名:</label>
        <input type="hidden" name="id" th:value="${menu.id}">
        <div class="layui-input-block">
            <input type="text" name="name"  th:value="${menu.name}" required  lay-verify="required" placeholder="请输入菜名" autocomplete="off" class="layui-input" style="width: 200px">
        </div>
    </div>
    </br>
    <div class="layui-form-item">
        <label class="layui-form-label"> 单价：</label>
        <div class="layui-input-block">
            <input type="text" name="price"  th:value="${menu.price}" required  lay-verify="required" placeholder="请输入单价" autocomplete="off" class="layui-input" style="width: 200px">
        </div>
    </div>
    </br>
    <div class="layui-form-item">
        <label class="layui-form-label">口味：</label>
        <div class="layui-input-block">
            <input type="text" name="flavor"  th:value="${menu.flavor}" required  lay-verify="required" placeholder="口味" autocomplete="off" class="layui-input" style="width: 200px">
        </div>
    </div>
    </br>
    <div class="layui-form-item">
        <label class="layui-form-label">类型：</label>
        <div class="layui-input-block">
            <select name="tid" th:if="${menu.tid==1}">
        <option value="1" selected>热菜</option>
        <option value="2">凉菜</option>
        <option value="3">汤羹</option>
        <option value="4">主食</option>
        <option value="5">烘焙</option>
    </select>
    <select name="tid" th:if="${menu.tid==2}">

        <option value="1" >热菜</option>
        <option value="2" selected>凉菜</option>
        <option value="3">汤羹</option>
        <option value="4">主食</option>
        <option value="5">烘焙</option>
    </select>


        <select name="tid" th:if="${menu.tid==3}">

            <option value="1" >热菜</option>
            <option value="2">凉菜</option>
            <option value="3" selected>汤羹</option>
            <option value="4">主食</option>
            <option value="5">烘焙</option>
        </select>
    <select name="tid" th:if="${menu.tid==4}">
        <option value="1" >热菜</option>
        <option value="2">凉菜</option>
        <option value="3">汤羹</option>
        <option value="4" selected>主食</option>
        <option value="5">烘焙</option>
    </select>
    <select name="tid" th:if="${menu.tid==5}">
        <option value="1" >热菜</option>
        <option value="2">凉菜</option>
        <option value="3">汤羹</option>
        <option value="4" >主食</option>
        <option value="5" selected>烘焙</option>
    </select>
        </div>
    </div>
            <br>
    <input class="layui-btn" type="submit" value="修改">
</form>
</body>
</html>